---
id: update
title: "Modify data: update()"
slug: update
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Performs an UPDATE on the table.

<Tabs
  defaultValue="js"
  groupId="libraries"
  values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>

<TabItem value="js">

```js
const { data, error } = await supabase
  .from('cities')
  .update({ name: 'Middle Earth' })
  .match({ name: 'Auckland' })
```


</TabItem>
<TabItem value="py">

```py
# Not yet implemented
```


</TabItem>

</Tabs>

## Parameters


<ul className="method-list-group">
  
<li className="method-list-item">
  <h4 className="method-list-item-label">
    <span className="method-list-item-label-name">
      values
    </span>
    <span className="method-list-item-label-badge required">
      required
    </span>
    <span className="method-list-item-validation">
      Partial
    </span>
  </h4>
  <div class="method-list-item-description">

The values to update.
  
  </div>
  
</li>

</ul>


## Notes

- `update()` should always be combined with [Filters](/docs/client/using-filters) to target the item(s) you wish to update.










## Examples

### Updating your data



<Tabs
  defaultValue="js"
  groupId="libraries"
  values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>

<TabItem value="js">

```js
const { data, error } = await supabase
  .from('cities')
  .update({ name: 'Middle Earth' })
  .match({ name: 'Auckland' })
```


</TabItem>
<TabItem value="py">

```py
# Not yet implemented
```


</TabItem>

</Tabs>